package com.example.mybatis.Service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import com.example.mybatis.Pojo.TallyBook1;
import com.example.mybatis.Service.TallyBook1Service;
import com.example.mybatis.mapper.TallyBook1Mapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class TallyBook1ServiceImpl extends ServiceImpl<TallyBook1Mapper, TallyBook1> implements TallyBook1Service {

    //通过学号来查询历史借阅情况
    public List<TallyBook1> getTallyBook1ListByUsername(String username) {
        QueryWrapper<TallyBook1> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username);
        return list(queryWrapper);
    }
}
